/*
 * Filename:    KpiBatchJobLogDTO.java
 * Copyright:   2014 中国平安保险（集团）股份有限公司 版权所有
 * Company:     平安科技养老险及健康险系统开发部
 * Create at:   2014年10月14日
 */
package com.paic.mhis.hcpms.quota.calculationreport.calculationjob.dto;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 批次job日志
 * 
 * @author DUQIFANG262
 * 
 */
public class KpiBatchJobLogDTO {
	private String idBatchLog;
	private String jobName;
	private String jobNameDesc;
	private String batchNo;
	private String jobExceptionMessage;
	private Date opertionTime;
	private String createBy;
	private Date createDate;
	private String updateBy;
	private Date updateDate;
	private String status;

	public String getIdBatchLog() {
		return idBatchLog;
	}

	public void setIdBatchLog(String idBatchLog) {
		this.idBatchLog = idBatchLog;
	}

	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	public String getJobNameDesc() {
		return jobNameDesc;
	}

	public void setJobNameDesc(String jobNameDesc) {
		this.jobNameDesc = jobNameDesc;
	}

	public String getBatchNo() {
		return batchNo;
	}

	public void setBatchNo(String batchNo) {
		this.batchNo = batchNo;
	}

	public String getJobExceptionMessage() {
		return jobExceptionMessage;
	}

	public void setJobExceptionMessage(String jobExceptionMessage) {
		this.jobExceptionMessage = jobExceptionMessage;
	}

	public Date getOpertionTime() {
		return opertionTime;
	}

	public void setOpertionTime(Date opertionTime) {
		this.opertionTime = opertionTime;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public void setSuccessMessage(String message, String areaCode, String month) {
		SimpleDateFormat sft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		StringBuffer buffer = new StringBuffer();
		buffer.append("统筹区为").append(areaCode);
		buffer.append("期间为").append(month).append(",");
		buffer.append(message).append(",");
		buffer.append("从").append(sft.format(createDate)).append("开始到");
		buffer.append(sft.format(updateDate)).append("结束,");
		buffer.append(" 共计用时").append(createDate.getTime() - updateDate.getTime());
		this.jobExceptionMessage = buffer.toString();
	}
}
